<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : hotproducts.xsl
    Created on : May 24, 2013, 1:27 PM
    Author     : Kim
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html"/>

    <!-- TODO customize transformation rules 
         syntax recommendation http://www.w3.org/TR/xslt 
    -->
    <xsl:template match="products">
        <xsl:for-each select="product">

            <xsl:if test="(noSell='0')">
                <xsl:if test="(proType='1')">
<!--                    <xsl:choose select="position()<4">-->
                        <div class="bs_box">
                            <a>
                                <img style="height: 200px; width: 212px">
                                    <xsl:attribute name="src">
                                        <xsl:value-of select="Image"/>
                                    </xsl:attribute>
                                </img>
                            </a>
                            <h4>
                                <a>
                                    <xsl:value-of select="proName"/>
                                </a>
                            </h4>
                            <p style="color: #8fb410; font-size: 14px; font-weight: 700;">
                    VND
                                <xsl:value-of select="format-number(Price, '###,###')"/>
                            </p>
                        
                            <a style="cursor: hand; cursor: pointer;float: left; display: block; width: 78px;
                        height: 28px; line-height: 28px; text-align: center;
                        color: #fff; background: darkturquoise">
                                <xsl:attribute name="onclick" >addToCart('<xsl:value-of select="proID"/>','<xsl:value-of select="proName"/>','<xsl:value-of select="Price"/>')
                                </xsl:attribute>Add to Cart
                            </a>
                            <a href="#" onclick="viewProductDetail('{proID}')"
                        style="float: left; display: block;
                        width: 80px; height: 28px; line-height: 28px;
                        text-align: center; background: gainsboro" >
                            Detail
                            </a>
                            <div class="cleaner"></div>
                        </div>
<!--                    </xsl:choose>-->
                </xsl:if>
            </xsl:if>
        </xsl:for-each>
    </xsl:template>
</xsl:stylesheet>
